<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

{config_load file="default.conf" section="forms"}
{config_load file="login.conf"}

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$language->getLanguage()}" dir="{$language->getDirection()}">
	<head>
		{include file=$theme->getTemplateUrl("head_common.tpl")}
		<title>{#PAGE_TITLE#}</title>
	</head>
	
	<body>
		{include file=$theme->getTemplateUrl("body_start.tpl")}
		
		<h2>{#HEADING_TITLE#}</h2>
		
		{if $messageStack->getSize("login") > 0}
			<ul class="errors">
				{foreach item="message" from=$messageStack->getMessages("login")}
					<li class="{$message.type}">{$theme->get_config_vars($message.message)}</li>
				{/foreach}
			</ul>
		{/if}
		
		{if $cart->getProductCount() > 0}
			<p><small>{#TEXT_VISITORS_CART#}</small></p>
		{/if}
		
		<h3>{#HEADING_NEW_CUSTOMER#}</h3>
		
		<p>{#TEXT_NEW_CUSTOMER#}</p>
		
		<p><a href="{$smarty.const.FILENAME_CREATE_ACCOUNT}">{#TEXT_BUTTON_NEW_ACCOUNT#}</a></p>
		
		<h3>{#HEADING_RETURNING_CUSTOMER#}</h3>
		
		<p>{#TEXT_RETURNING_CUSTOMER#}</p>
		
		<form action="{$smarty.const.FILENAME_LOGIN}?action=process" method="post">
			<fieldset>
				<p>
					<label class="columnar" for="email_address">{#ENTRY_EMAIL_ADDRESS#}</label>
					<input type="text" name="email_address" id="email_address" value="{$smarty.post.email_address}" />
				</p>
				
				<p>
					<label class="columnar" for="password">{#ENTRY_PASSWORD#}</label>
					<input type="password" name="password" id="password" value="{$smarty.post.password}" />
				</p>
				
				<p><small><a href="{$smarty.const.FILENAME_PASSWORD_FORGOTTEN}">{#TEXT_PASSWORD_FORGOTTEN#}</a></small></p>
				
				<p><input type="submit" name="submit" value="{#TEXT_BUTTON_LOGIN#}" /></p>
			</fieldset>
		</form>
		
		{include file=$theme->getTemplateUrl("body_end.tpl")}
	</body>
</html>
